import os
def getpath():
    ps=__file__.split(os.path.sep)
    print(ps)
    r=""
    for i in ps[:-1]:
        r=r+i+os.path.sep
    return(r)
if __name__=="__main__":    
    print(getpath())
   
    